package menu;

import static game.TextManager.t;

/**
 *
 * @author Luan
 */
public class MenuData {
    public static SimpleMenu MAIN_MENU;
    
    private MenuData() {}
    
    public static void load() {
        SimpleMenu.SimpleMenuItem[] si = new SimpleMenu.SimpleMenuItem[t().MENU_ITEMS[1].length];
        for (int i = 0; i < si.length; i++)
            si[i] = new SimpleMenu.SimpleMenuItem(-1, t().MENU_ITEMS[1][i], null);
        si[0].son = new SaveLoadMenu(-1, t().MENU_ITEMS[1][0], true);
        si[1].son = new SaveLoadMenu(-1, t().MENU_ITEMS[1][1], false);
        si[3].setSubActionCode(4);
        SimpleMenu system = new SimpleMenu(0, t().MENU_ITEMS[0][4], null, si);

        SimpleMenu.SimpleMenuItem[] ji = new SimpleMenu.SimpleMenuItem[t().MENU_ITEMS[3].length];
        for (int i = 0; i < ji.length; i++)
            ji[i] = new SimpleMenu.SimpleMenuItem(-1, t().MENU_ITEMS[3][i], null);
        SimpleMenu journal = new SimpleMenu(3, t().MENU_ITEMS[0][2], null, ji);
        
        SimpleMenu.SimpleMenuItem[] items = new SimpleMenu.SimpleMenuItem[] {
            new SimpleMenu.SimpleMenuItem(5, t().MENU_ITEMS[0][0], new Status()),
            new SimpleMenu.SimpleMenuItem(4, t().MENU_ITEMS[0][1], new ItemInterface()),//new InventoryMenu(4, t().MENU_ITEMS[0][1])),
            new SimpleMenu.SimpleMenuItem(3, t().MENU_ITEMS[0][2], journal),
            new SimpleMenu.SimpleMenuItem(2, t().MENU_ITEMS[0][3], new MapMenu(2, t().MENU_ITEMS[0][3])),
            new SimpleMenu.SimpleMenuItem(0, t().MENU_ITEMS[0][4], system)
        };
        MAIN_MENU = new SimpleMenu(1, t().MENU_NAME, null, items);
    }
}
